<?php echo $header; ?>
		<div id="main">
                        	
                            <!-- Begin main-content  -->
                            <div class="no-sidebar fl-left" id="content">
                            	<!-- Breadcumbs  -->
                            	<div class="fl-left" id="breadcumbs">
                                	<ul id="crumbs">
                                        <li><a href=".">Trang chủ</a></li>
                                        <li><span>Chỉnh sửa tài khoản</span></li>
                                    </ul>
                                </div>
                                <!-- /Breadcumbs  -->
                                
                                <!-- Payment login and register-->
                                <div class="order-process">
                                    <h1 class="tt-h1">Chỉnh sửa tài khoản</h1>
                                    <p class="message info" style="display:none;">Xin vui lòng điền những thông tin cần thiết để chỉnh sửa tài khoản mới của Quý khách để thuận tiện cho việc mua hàng và nhận hậu mãi tại ShopMeBuu.com.vn. </p>
                                    <?php
                                    if ($error) {
                                    
                                    ?>
                                    <p class="message warning">Đăng ký của bạn chưa thành công. Xin vui lòng điền những trường thông tin có đánh dấu <span class="red">*</span> 
                                        <?php if ($error_warning) { ?>
                                          <br/><?php echo $error_warning; ?></div>
                                      	<?php } ?>
                                        <?php if ($error_firstname) { ?>
                                            <br/><?php echo $error_firstname; ?>
                                        <?php } ?>
                                         <?php if ($error_email) { ?>
                                         <br/><?php echo $error_email; ?>
                                         <?php } ?>
                                         <?php if ($error_username) { ?>
                                         <br/><?php echo $error_username; ?>
                                         <?php } ?>
                                         <?php if ($error_password) { ?>
                                        <br/><?php echo $error_password; ?>
                                        <?php } ?>
                                        <?php if ($error_confirm) { ?>
                                        <br/><?php echo $error_confirm; ?>
                                        <?php } ?>
                                         <?php if ($error_telephone) { ?>
                                         <br/><?php echo $error_telephone; ?>
                                         <?php } ?>
                                         <?php if ($error_address_1) { ?>
                                         <br/><?php echo $error_address_1; ?>
                                         <?php } ?>
                                         <?php if ($error_address_2) { ?>
                                         <br/><?php echo $error_address_2; ?>
                                         <?php } ?>
                                         <?php if ($error_city) { ?>
                                         <br/><?php echo $error_city; ?>
                                         <?php } ?>
                                         
                                    </p>
                                     <?php } ?>
                                   
                                    
                                    <!--Register-->
                                    <div class="w500 fl-left">
                                        <div class="register-form">
                                            <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="registerForm">
                                            <fieldset>
                                                    <script type="text/javascript">
                                                        function toggleDiv(otherAddress) {
                                                           $("#otherAddress").toggle();
                                                        }
                                                    </script>
                                                    <div class="input-set">
                                                        <label><?php echo $entry_firstname; ?> <span class="red">*</span></label>
                                                        <input type="text"  name="firstname" value="<?php echo $firstname; ?>" >
                                                        <label><?php echo $entry_email; ?> <span class="red">*</span></label>
                                                        <input type="text" name="email" value="<?php echo $email; ?>"  >
                                                        <label>Tên đăng nhập <span class="red">*</span></label>
                                                        <input type="text" disabled="disabled"  value="<?php echo $username; ?>" name="username">
                                                        <label>Mật khẩu </label>
                                                        <input type="password" name="password" value="<?php echo $password; ?>" >
                                                        <label>Xác nhận Mật khẩu </label>
                                                        <input type="password" name="confirm" value="<?php echo $confirm; ?>" >
                                                        <label><?php echo $entry_telephone; ?> <span class="red">*</span></label>
                                                        <input type="text" name="telephone" value="<?php echo $telephone; ?>">
                                                        <label><?php echo $entry_address_1; ?> <span class="red">*</span></label>
                                                        <input type="text"  name="address_1" value="<?php echo $address_1; ?>" >
                                                        <label><?php echo $entry_address_2; ?> <span class="red">*</span></label>
                                                        <input type="text" name="address_2" value="<?php echo $address_2; ?>">
                                                        <label><?php echo $entry_city; ?><span class="red">*</span></label>
                                                        <input type="text"  name="city" value="<?php echo $city; ?>" >
                                                        <label><?php echo $entry_zone; ?> <span class="red">*</span></label>
                                                        <select name="zone_id">
            											</select>
                                                        <p class="note">Trường đánh dấu với <span>*</span> là bắt buộc.</p>
                                                        <input type="hidden" value="230" name="country_id" /> 
                                                        <input type="hidden" name="lastname" value="lastname" />
                                                        <input type="hidden" name="company" value="company" />
                                                        <input type="hidden" name="postcode" value="post" />
                                                    </div>
                                                    <!--
                                                    <a href="javascript:toggleDiv('otherAddress');" class="address-switch">Thông tin, địa chỉ khác của qúy khách</a>
                                                    <div style="display: none;" class="input-set pdb10" id="otherAddress">
                                                        <label>Họ tên qúy khách<span class="red">*</span></label>
                                                        <input type="text" value="" name="Tên KH2">
                                                        <label>Điện thoại <span class="red">*</span></label>
                                                        <input type="text" value="" name="Telephone2">
                                                        <label>Địa chỉ <span class="red">*</span></label>
                                                        <input type="text" value="" name="Address">
                                                        <label>Phường/Xã <span class="red">*</span></label>
                                                        <input type="text" value="" name="Ward">
                                                        <label>Quận/Huyện <span class="red">*</span></label>
                                                        <input type="text" value="" name="District">
                                                        <label>Tỉnh/Thành phố <span class="red">*</span></label>
                                                        <select name="City">
                                                        	<option>Hà Nội</option>
                                                            <option>Hải Phòng</option>
                                                            <option>Quảng Ninh </option>
                                                            <option>Đà Nẵng</option>
                                                            <option>Thành phố Hồ Chí Minh</option>
                                                            <option>Thừa Thiên - Huế</option>
                                                            <option>Cần Thơ </option>
                                                            <option>Bà Rịa - Vũng Tàu</option>
                                                            <option>Ninh Bình</option>
                                                            <option>Hà Nam</option>
                                                            <option>Nam Định</option>
                                                            <option>Hòa Bình</option>
                                                            <option>Khánh Hòa</option>
                                                            <option>Thái Bình </option>
                                                            <option>Thái Nguyên</option>
                                                            <option>Vĩnh Phúc</option>
                                                            <option>Nghệ An</option>
                                                            <option>Phú Thọ</option>
                                                            <option>Hải Dương</option>
                                                            <option>Bắc Ninh</option>
                                                            <option>Thanh Hóa </option>
                                                            <option>Tuyên Quang</option>
                                                            <option>Hà Tĩnh</option>
                                                            <option>Lâm Đồng</option>
                                                        </select>
                                                    </div>
                                                    -->
                                                    <div class="form-submit">
                                                    	<a onclick="$('#registerForm')[0].reset();" class="btn button fl-left">Hủy</a>
                                                    	<a onclick="$('#registerForm').submit();" class="btn button fl-left mgl10">Lưu</a>
                                                    </div>
                                                    
                                                </fieldset>
                                            </form>
                                        </div>
                                     </div>
                                      <!--/Register-->
                                      <!--Register info-->
                                      <div class="w410 fl-left mgl30">
                                      	<?php echo $info_end;?>
                                      </div>
                                      <!--Register info-->
                                      
                                      <div class="clear"></div>
                                      <div class="form-submit top-gap-10">
                                         <a href="shopping-cart.php" class="link-btn back fl-left">Trở lại</a>
                                     </div>
                                      	
                                </div>
                                <!-- /product detail-->

                            </div>
                            <!-- / main-content  -->
                              
                            <!-- /end mid-content  -->
                            
                        </div>
     </div>  

<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=common/register/zone&country_id=230&zone_id=<?php echo $zone_id; ?>');
//--></script> 

<?php echo $footer; ?>



<?php return;?>

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <p><?php echo $text_account_already; ?></p>
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="register">
    <h2><?php echo $text_your_details; ?></h2>
    <div class="content">
      <table class="form">
        <tr>
          <td><span class="required">*</span> <?php echo $entry_firstname; ?></td>
          <td><input type="text" name="firstname" value="<?php echo $firstname; ?>" />
            <?php if ($error_firstname) { ?>
            <span class="error"><?php echo $error_firstname; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_lastname; ?></td>
          <td><input type="text" name="lastname" value="<?php echo $lastname; ?>" />
            <?php if ($error_lastname) { ?>
            <span class="error"><?php echo $error_lastname; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_email; ?></td>
          <td><input type="text" name="email" value="<?php echo $email; ?>" />
            <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
          <td><input type="text" name="telephone" value="<?php echo $telephone; ?>" />
            <?php if ($error_telephone) { ?>
            <span class="error"><?php echo $error_telephone; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_fax; ?></td>
          <td><input type="text" name="fax" value="<?php echo $fax; ?>" /></td>
        </tr>
      </table>
    </div>
    <h2><?php echo $text_your_address; ?> </h2>
    <div class="content">
      <table class="form">
        <tr>
          <td><?php echo $entry_company; ?></td>
          <td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_address_1; ?></td>
          <td><input type="text" name="address_1" value="<?php echo $address_1; ?>" />
            <?php if ($error_address_1) { ?>
            <span class="error"><?php echo $error_address_1; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_address_2; ?></td>
          <td><input type="text" name="address_2" value="<?php echo $address_2; ?>" /></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_city; ?></td>
          <td><input type="text" name="city" value="<?php echo $city; ?>" />
            <?php if ($error_city) { ?>
            <span class="error"><?php echo $error_city; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_postcode; ?></td>
          <td><input type="text" name="postcode" value="<?php echo $postcode; ?>" />
            <?php if ($error_postcode) { ?>
            <span class="error"><?php echo $error_postcode; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_country; ?></td>
          <td><select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($countries as $country) { ?>
              <?php if ($country['country_id'] == $country_id) { ?>
              <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>
            <?php if ($error_country) { ?>
            <span class="error"><?php echo $error_country; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
          <td><select name="zone_id">
            </select>
            <?php if ($error_zone) { ?>
            <span class="error"><?php echo $error_zone; ?></span>
            <?php } ?></td>
        </tr>
      </table>
    </div>
    <h2><?php echo $text_your_password; ?></h2>
    <div class="content">
      <table class="form">
        <tr>
          <td><span class="required">*</span> <?php echo $entry_password; ?></td>
          <td><input type="password" name="password" value="<?php echo $password; ?>" />
            <?php if ($error_password) { ?>
            <span class="error"><?php echo $error_password; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_confirm; ?></td>
          <td><input type="password" name="confirm" value="<?php echo $confirm; ?>" />
            <?php if ($error_confirm) { ?>
            <span class="error"><?php echo $error_confirm; ?></span>
            <?php } ?></td>
        </tr>
      </table>
    </div>
    <h2><?php echo $text_newsletter; ?></h2>
    <div class="content">
      <table class="form">
        <tr>
          <td><?php echo $entry_newsletter; ?></td>
          <td><?php if ($newsletter == 1) { ?>
            <input type="radio" name="newsletter" value="1" checked="checked" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" />
            <?php echo $text_no; ?>
            <?php } else { ?>
            <input type="radio" name="newsletter" value="1" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" checked="checked" />
            <?php echo $text_no; ?>
            <?php } ?></td>
        </tr>
      </table>
    </div>
    <?php if ($text_agree) { ?>
    <div class="buttons">
      <div class="right"><?php echo $text_agree; ?>
        <?php if ($agree) { ?>
        <input type="checkbox" name="agree" value="1" checked="checked" />
        <?php } else { ?>
        <input type="checkbox" name="agree" value="1" />
        <?php } ?>
        <a onclick="$('#register').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
    <?php } else { ?>
    <div class="buttons">
      <div class="right"><a onclick="$('#register').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
    <?php } ?>
  </form>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script> 
<script type="text/javascript"><!--
$('.fancybox').fancybox({
	width: 560,
	height: 560,
	autoDimensions: false
});
//--></script>  
<?php echo $footer; ?>